import { VxeTablePropTypes,VxeColumnPropTypes } from 'vxe-table'
const tableOption = {
  table: {
    height: 400,
    align: 'center',
    size: 'small',
    opIcon:true,
    round: true,
    columnConfig: { resizable: true },
    maxHeight: 500,
    stripe: true,
    operate:true,
    checkboxconfig: {labelField: 'id', highlight: true, range: true},
  },
  operates: [
    {btnName:'编辑',icon:'vxe-icon-edit',view:[],target:'',type:'edit',status:'primary'},
    {btnName:'查看',icon:'vxe-icon-eye-fill',view:['N'],target:'status',type:'view',status:'success'},
    {btnName:'删除',icon:'vxe-icon-delete',view:['N'],target:'status',type:'delete',status:'danger'},
  ],
  column: [
    {
      type: 'checkbox',//类型：checkbox复选框 radio单选框  seq序号   类型string 非必传
      width: '60', //列宽 类型string
      align: 'center',
      fixed:'left',
      visible: true
    },
    {
      field: 'repetName',
      title: '报表名称', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: false, 
      align: 'center',
      showOverflow: 'tooltip',
      inputType:'input',
      editRender: {},
    },
    {
      field: 'repetNumber',
      title: '报表编号', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
      inputType:'input',
      editRender:{}
    },
    {
      field: 'defUser',
      title: '创建人', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
      inputType:'input',
      editRender:{}
    },
    {
      field: 'createTime',
      title: '创建时间', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
      inputType:'date',
      editRender:{}
    },
    {
      field: 'status',
      title: '状态', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
      formatter:<VxeColumnPropTypes.Formatter>(({ cellValue, row, column }) => {
        return cellValue == 'Y'?'启动':'未启动'
      }),
      inputType:'select',
      editRender:{},
      options:[
        { label: '', value: '' },
        { label: '启用', value: 'Y' },
        { label: '未启用', value: 'N' }
      ],
      placeholder:"请选择状态"
    },
    {
      field: 'rptType',
      title: '报表类型', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
      inputType:'select',
      editRender:{},
      placeholder:"请选报表类型"
    }
  ],
  form:{
    labelPosition:'right',
    labelWidth:80,
    statusIcon:false,
    validateOnRuleChange:true,
    size:'default',
    scrollToError: true,
    span:6,
    items:[
      {
        prop:'repetName',
        label:'报表名称',
        labelWidth:80,
        inputType:'input',
        span:6,
        placeholder:'',
        clearable:true,
        disabled:false,
        prefixIcon:'',
        suffixIcon:'',
        readonly:false,
        type:'text'
      },
      {
        prop:'repetNumber',
        label:'报表编号',
        labelWidth:80,
        inputType:'input',
        span:6,
        placeholder:'',
        clearable:true,
        disabled:false,
        prefixIcon:'',
        suffixIcon:'',
        readonly:false,
        type:'text'
      },
      {
        prop:'status',
        label:'状态',
        labelWidth:80,
        inputType:'select',
        span:6,
        placeholder:'',
        clearable:true,
        disabled:false,
        readonly:false,
        option:[
          {label:'启用',value:'Y'},
          {label:'停用',value:'N'}
        ]
      },
    ]
  }
}


export default tableOption